package com.asj.house.controller;


import com.asj.house.service.HouseHitsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 房屋点击量表 前端控制器
 * </p>
 *
 * @author asj
 * @since 2021-03-08
 */
@RestController
@RequestMapping("/house-hits")
@Api(value = "房源点击量接口", tags = "房源点击量接口")
@Slf4j
public class HouseHitsController {

    @Resource
    private HouseHitsService houseHitsService;

    @PostMapping("/access")
    @ApiOperation(value = "房源点击量异步数据接入")
    @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "roomId", value = "房源id", required = true)
    public void houseHitsAccess(@RequestParam(value = "roomId", required = true) Integer roomId) {
        houseHitsService.houseHitsAccess(roomId);
    }

}
